<cp-navbar [border]="false" (onClickLeft)="onClickLeft()"></cp-navbar>
<div class="container">
  <div class="top">
    <div class="titlebox">
      <p class="title">验证码</p>
      <p class="desc">验证码已发送至{{ phone | encryPhone }}</p>
    </div>
    <div class="form">
      <div class="form-group codebox">
        <input type="tel" autofocus [maxlength]="maxlength" [(ngModel)]="captcha" />
        <div
          class="code"
          *ngFor="let item of captchaArray; index as index"
          [class.is-fill]="captcha.charAt(index) !== ''"
          [class.is-active]="index === captcha.length"
        >
          {{ captcha.charAt(index) }}
        </div>
      </div>
      <div class="form-group">
        <button
          class="btn btn-lg btn-circle btn-gradient btn-shadow btn-flex"
          (click)="checkCaptcha()"
          [disabled]="loging || captcha.length !== maxlength"
        >
          <img src="assets/images/loading.gif" [class.hide]="!loging" />
          <span class="txt">{{ loging ? '正在登录' : '登录' }}</span>
        </button>
      </div>
    </div>
  </div>
</div>
